package com.zy.spring01;

import com.zy.domain.Person;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

//创建容器
@RunWith(SpringJUnit4ClassRunner.class)
//读取配置文件
@ContextConfiguration("classpath:applicationContext.xml")
public class springTest2
{

    @Autowired
    private Person person;
    @Test
    public void test1()
    {
        System.out.println(person);
    }
}
